GATE IT 2007
Q41.
Early binding refers to a binding performed at compile time and late binding refers to a binding performed at execution time. Consider the following statements: i. Static scope facilitates w1 bindings. ii. Dynamic scope requires w2 bindings. iii. Early bindings w3 execution efficiency. iv. Late bindings w4 execution efficiency. The right choices of wl, w2, w3 and w4 (in that order) areQ42.
Consider a weighted, undirected graph with positive edge weights and let uv be an edge in the graph. It is known that the shortest path from the source vertex s to u has weight 53 and the shortest path from s to v has weight 65. Which one of the following statements is always TRUE?Q43.
Consider the following C program: #include < stdio.h > #define EOF -1 void push (int); /* push the argument on the stack */ int pop (void); /* pop the top of the stack */ void flagError (); int main () { int c, m, n, r; while ((c = getchar ()) != EOF) { if (isdigit (c) ) push (c); else if ((c == '+') || (c == '*')) { m = pop (); n = pop (); r = (c == '+') ? n + m : n*m; push (r); } else if (c != ' ') flagError (); } printf("% c", pop ()); } What is the output of the program for the following input?5 2 * 3 3 2 + * +Q44.
The contents of the text file t1 txt containing four lines are as follows : a1 b1 a2 b2 a3 b2 a4 b1 The contents of the text file t2 txt containing five lines are as follows : a1 c1 a2 c2 a3 c3 a4 c3 a5 c4 Consider the following Bourne shell script :awk - F ' ' ' {Print $1, $2} ' t1.txt | while read a b ; do awk -v aV = $ a - v by = $b - F ' ' aV = = $1 (print aV, bV, $2 ) ' t2.txt done Which one of the following strings will NOT be present in the output generated when the above script in run? (Note that the given strings may be substrings of a printed line.)Q45.
Consider the following two transactions : T1 and T2. T1:read (A); read (B); if A = 0 then B \leftarrow B + 1; write (B); T2 : read (B); read (A); if B \neq 0 then A \leftarrow A - 1; write (A); Which of the following schemes, using shared and exclusive locks, satisfy the requirements for strict two phase locking for the above transactions?Q46.
Consider the following statements about the timeout value used in TCP. i.The timeout value is set to the RTT (Round Trip Time) measured during TCP connection establishment for the entire duration of the connection. ii.Appropriate RTT estimation algorithm is used to set the timeout value of a TCP connection. iii.Timeout value is set to twice the propagation delay from the sender to the receiver. Which of the following choices hold?Q47.
Consider a TCP connection in a state where there are no outstanding ACKs. The sender sends two segments back to back. The sequence numbers of the first and second segments are 230 and 290 respectively. The first segment was lost, but the second segment was received correctly by the receiver. Let X be the amount of data carried in the first segment (in bytes), and Y be the ACK number sent by the receiver. The values of X and Y (in that order) areQ48.
What is the final value stored in the linear feedback shift register if the input is 101101?Q49.
Which of the following input sequences for a cross-coupled R-S flip-flop realized with two NAND gates may lead to an oscillation?